home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / bbsutils / gifcol27.arj / GIFCOLL.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-02-20  |  10KB  |  500 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Integer  INTEGER001
  20.     Integer  INTEGER002
  21.     Integer  INTEGER003
  22.     Integer  INTEGER004
  23.     Integer  INTEGER005
  24.     Integer  INTEGER006
  25.     Integer  INTEGER007
  26.     Integer  INTEGER008
  27.     Integer  INTEGER009
  28.     Integer  INTEGER010
  29.     Integer  INTEGER011
  30.     Integer  INTEGER012
  31.     Integer  INTEGER013
  32.     Integer  INTEGER014
  33.     Integer  INTEGER015
  34.     Integer  INTEGER016
  35.     String   STRING001
  36.     String   STRING002
  37.     String   STRING003
  38.     String   STRING004
  39.     String   STRING005
  40.     String   TSTRING006(11)
  41.     String   STRING007
  42.     String   STRING008
  43.     String   STRING009
  44.     String   STRING010
  45.     String   STRING011
  46.     String   STRING012
  47.     String   STRING013
  48.     String   STRING014
  49.     String   STRING015
  50.     String   STRING016
  51.     String   STRING017
  52.     String   STRING018
  53.  
  54. ;------------------------------------------------------------------------------
  55.  
  56.     STRING001 = "½ùÜ▀╕╢╣ÖÜì▀╜╜¼                                                 "
  57.     STRING002 = "Y"
  58.     STRING002 = YesChar()
  59.     INTEGER007 = 15
  60.     STRING008 = ReadLine(PCBDat(), 179)
  61.     STRING009 = GetEnv("PCBNODE")
  62.     STRING010 = STRING009
  63.     STRING011 = STRING010
  64.     If (STRING010 < 100) Then
  65.         STRING011 = "0" + STRING009
  66.         If (STRING010 < 10) Then
  67.             STRING011 = "00" + STRING009
  68.         Endif
  69.     Endif
  70.     STRING014 = ReadLine(PCBDat(), 94)
  71.     STRING017 = Random(9999)
  72.     If (STRING017 > 9980) Then
  73.         STRING017 = 9980
  74.     Endif
  75.     STRING018 = "FLIST." + STRING009
  76.     Log "GIF Collage processor command entered.", 0
  77.     If (TokCount() == 0) Then
  78.         PrintLn "@X0C Download path not specified on PPE command line."
  79.         Log "Download path not specified on GIFCOLL PPE command line.", 0
  80.         PrintLn "@X0F "
  81.         PrintLn "GIF Collage Processor Environment error - Inform your SysOp"
  82.         More
  83.         End
  84.     Endif
  85.     STRING016 = GetToken()
  86.     If (Exist("GIFCOLL." + STRING011)) Then
  87.         Delete "GIFCOLL." + STRING011
  88.     Endif
  89.     Shell 1, INTEGER016, PPEPath() + "GIFCOL0.EXE " + STRING011 + STRING001, ""
  90.     INTEGER016 = 1
  91.     If (Exist("GIFCOLL." + STRING011)) Then
  92.         FOpen 1, "GIFCOLL." + STRING011, 0, 0
  93.         FGet 1, STRING015
  94.         FClose 1
  95.         Delete "GIFCOLL." + STRING011
  96.         If (Exist(PPEPath() + "GIFCOLL." + STRING010)) Then
  97.             Delete PPEPath() + "GIFCOLL." + STRING010
  98.         Endif
  99.         If (STRING014 == STRING015) Then
  100.             INTEGER016 = 0
  101.         Else
  102.             STRING012 = STRING014
  103.             STRING013 = STRING014
  104.             Tokenize STRING014
  105.             If (TokCount() < 6) Then
  106.                 Goto LABEL001
  107.             Endif
  108.             Select Case (GetToken())
  109.                 Case "BITS"
  110.                 Case "AND"
  111.                 Case "BYTES"
  112.                 Case "BBS"
  113.                     INTEGER016 = 0
  114.                     :LABEL001
  115.                     Tokenize STRING012
  116.                     If (TokCount() < 2) Then
  117.                         Goto LABEL002
  118.                     Endif
  119.                     Select Case (GetToken())
  120.                         Case "CHANNEL"
  121.                         Case "1"
  122.                             INTEGER016 = 0
  123.                     End Select
  124.                     Tokenize STRING013
  125.                     If (TokCount() < 3) Then
  126.                         Goto LABEL002
  127.                     Endif
  128.                 Case "CHANNEL"
  129.                 Case "1(R)"
  130.                 Case "COMMUNICATIONS"
  131.                     INTEGER016 = 0
  132.                     Goto LABEL002
  133.                 Endif
  134.             Endif
  135.     End Select
  136.     :LABEL002
  137.     Cls
  138.     PrintLn " "
  139.     PrintLn "@X38┌────────────────────────────────────────────────────────────────────────────@X3B┐@X0B"
  140.     If (INTEGER016 == 0) Then
  141.         PrintLn "@X38│@X39                   GIF Collage Builder - Registered v2.7                    @X3B│@X0B"
  142.     Else
  143.         PrintLn "@X38│@X3E                    GIF Collage Builder - Shareware v2.7                    @X3B│@X0B"
  144.         PrintLn "@X38│@X3E                        Unregistered Evaluation Copy                        @X3B│@X0B"
  145.     Endif
  146.     PrintLn "@X38└@X3B────────────────────────────────────────────────────────────────────────────┘@X0F"
  147.     If (Exist("GIFCOLL." + STRING011)) Delete "GIFCOLL." + STRING011
  148.     If (Exist(STRING018)) Goto LABEL003
  149.     Log "PCBoard control file " + STRING018 + " not found, nothing flagged.", 0
  150.     Goto LABEL009
  151.     :LABEL003
  152.     STRING005 = "FLIST" + STRING011 + ".WRK"
  153.     If (Exist(STRING005)) Delete STRING005
  154.     FOpen 1, STRING018, 0, 0
  155.     FOpen 2, STRING005, 1, 1
  156.     :LABEL004
  157.     If (Ferr(1)) Goto LABEL005
  158.     FRead 1, STRING015, 129
  159.     FWrite 2, STRING015, 129
  160.     Goto LABEL004
  161.     :LABEL005
  162.     FClose 1
  163.     FClose 2
  164.     SaveScrn
  165.     Shell 1, INTEGER001, PPEPath() + "GIFCOL1.EXE " + STRING011 + STRING009, ""
  166.     RestScrn
  167.     INTEGER001 = 0
  168.     If (Exist("GIFCOLL." + STRING011)) Then
  169.         Goto LABEL006
  170.     Endif
  171.     Log "Unable to read PCBoard control file " + STRING018, 0
  172.     Log "Probable installation error.", 0
  173.     Log "Be sure that you have SHARE loaded.", 0
  174.     Goto LABEL009
  175.     :LABEL006
  176.     FOpen 1, "GIFCOLL." + STRING011, 0, 0
  177.     FGet 1, STRING015
  178.     :LABEL007
  179.     If (Ferr(1)) Goto LABEL008
  180.     INTEGER001 = INTEGER001 + 1
  181.     FGet 1, STRING015
  182.     Goto LABEL007
  183.     :LABEL008
  184.     FClose 1
  185.     If (INTEGER001 > 1) Then
  186.         INTEGER001 = INTEGER001 / 2
  187.     Endif
  188.     If (INTEGER001 > 0) Then
  189.         Goto LABEL010
  190.     Endif
  191.     :LABEL009
  192.     PrintLn " "
  193.     PrintLn "@X0EYou have not flagged any @X0CGIF@X0E files for a collage.@X0F"
  194.     PrintLn " "
  195.     DispFile HelpPath() + "GIF", 1 + 4
  196.     End
  197.     :LABEL010
  198.     If (INTEGER001 > 99) Then
  199.         PrintLn "@X0AYou have ", INTEGER001, " GIF's flagged - 99 is the max for this command."
  200.         PrintLn "The first 99 of them can be placed in collage files."
  201.         InputStr "@X0EDo you wish to continue (@X0CY@X0E/@X0CN@X0E)", STRING002, 14, 1, "", 8192 + 16384
  202.         If (Upper(STRING002) == "N") Then
  203.             Cls
  204.             End
  205.         Endif
  206.         INTEGER001 = 99
  207.     Endif
  208.     INTEGER008 = INTEGER001
  209.     If (INTEGER016 == 0) Then
  210.         Goto LABEL011
  211.     Endif
  212.     PrintLn " "
  213.     Print "@X0EAsk your SysOp to register this program to get rid of this delay. "
  214.     Print "@X0C"
  215.     For INTEGER002 = 1 To INTEGER007
  216.         Print "/"
  217.         Delay 4
  218.         Backup 1
  219.         Print "-"
  220.         Delay 5
  221.         Backup 1
  222.         Print "\"
  223.         Delay 4
  224.         Backup 1
  225.         Print "|"
  226.         Backup 1
  227.         Delay 5
  228.     Next
  229.     Backup 66
  230.     ClrEol
  231.     Goto LABEL012
  232.     :LABEL011
  233.     PrintLn " "
  234.     :LABEL012
  235.     PrintLn "@X0FYou have @X0A", INTEGER008, "@X0F GIF files flagged."
  236.     PrintLn " "
  237.     INTEGER013 = INTEGER008 / 9 + 1
  238.     INTEGER014 = INTEGER008 * 20 + INTEGER013 * 13
  239.     INTEGER011 = INTEGER014 / 60
  240.     If (INTEGER011 == 0) Then
  241.         INTEGER011 = 1
  242.     Endif
  243.     INTEGER012 = INTEGER011 + 1
  244.     If (INTEGER012 < 3) Then
  245.         PrintLn "@X0FIt will take 1-2 minutes to build your collage.  Please be patient."
  246.         PrintLn 
  247.     Else
  248.         If (MinLeft() < INTEGER012) Then
  249.             If (INTEGER013 < 10) Then
  250.                 PrintLn "@X0AYou do not have enough time left to build the collage file."
  251.                 Goto LABEL013
  252.             Endif
  253.             PrintLn "@X0AYou do not have enough time left to build the collage files."
  254.             :LABEL013
  255.             PrintLn "@X0F"
  256.             End
  257.         Endif
  258.         If (INTEGER001 < 10) Then
  259.             PrintLn "@X0FIt may take @X0E", INTEGER011, "-", INTEGER012, " minutes@X0F to build the collage file."
  260.         Else
  261.             PrintLn "@X0FIt may take @X0E", INTEGER011, "-", INTEGER012, " minutes@X0F to build the collage files."
  262.         Endif
  263.         InputStr "@X0EDo you wish to continue (@X0CY@X0E/@X0CN@X0E)", STRING002, 14, 1, "", 8192 + 16384
  264.         If (Upper(STRING002) == "N") Then
  265.             Cls
  266.             End
  267.         Endif
  268.         Newline
  269.         PrintLn " "
  270.         PrintLn "@X0AOK, here we go....."
  271.         PrintLn " "
  272.     Endif
  273.     If (Exist("GIFDEDK.CMD")) Goto LABEL014
  274.     Copy PPEPath() + "GIFDESK.CMD", "GIFDESK.CMD"
  275.     :LABEL014
  276.     For INTEGER002 = 1 To 11
  277.         TSTRING006(INTEGER002) = "*"
  278.     Next
  279.     INTEGER015 = 1
  280.     SaveScrn
  281.     Shell 1, INTEGER002, "ATTRIB -r " + STRING008 + "*.GIF", ""
  282.     Shell 1, INTEGER002, "DEL " + STRING008 + "*.GIF", ""
  283.     RestScrn
  284.     If (Exist("GIFDSK00.GIF")) Delete "GIFDSK00.GIF"
  285.     FOpen 1, "GIFCOLL." + STRING011, 0, 0
  286.     INTEGER010 = 0
  287.     INTEGER003 = GetX()
  288.     INTEGER004 = GetY()
  289.     :LABEL015
  290.     INTEGER009 = 9
  291.     If (INTEGER001 < 10) Then
  292.         INTEGER009 = INTEGER001
  293.     Endif
  294.     INTEGER001 = INTEGER001 - INTEGER009
  295.     INTEGER010 = INTEGER010 + 1
  296.     Print "@X0EPreparing @X0C", INTEGER009, "@X0E files for collage #", INTEGER010, ":@X0A"
  297.     INTEGER005 = GetX()
  298.     INTEGER006 = GetY()
  299.     For INTEGER002 = 1 To INTEGER009
  300.         FGet 1, STRING015
  301.         STRING003 = STRING015
  302.         FGet 1, STRING015
  303.         STRING004 = STRING008 + STRING015
  304.         AnsiPos INTEGER005, INTEGER006
  305.         ClrEol
  306.         Print " Frame ", INTEGER002, " is ", STRING015
  307.         Copy STRING003, STRING004
  308.     Next
  309.     AnsiPos INTEGER003, INTEGER004
  310.     ClrEol
  311.     :LABEL016
  312.     STRING017 = STRING017 + 1
  313.     STRING004 = STRING017
  314.     STRING003 = "C" + STRING010 + STRING004 + ".GIF"
  315.     INTEGER002 = 1
  316.     While (INTEGER002 < INTEGER015 + 1) Do
  317.         If (STRING003 == TSTRING006(INTEGER002)) Then
  318.             Goto LABEL016
  319.         Endif
  320.         INTEGER002 = INTEGER002 + 1
  321.     EndWhile
  322.     Print "@X0EBuilding GIF collage #", INTEGER010, " (", STRING003, ") - Please stand by....."
  323.     SaveScrn
  324.     Shell 1, INTEGER002, PPEPath() + "GIFDESK.EXE " + STRING008 + "*.gif", ""
  325.     RestScrn
  326.     If (Exist("GIFDSK00.GIF")) Goto LABEL017
  327.     PrintLn "@X0AGIFDESK collage build failed - Notify your SysOp."
  328.     Log "GIFDESK did not build the collage.", 0
  329.     PrintLn " "
  330.     PrintLn "@PAUSE@"
  331.     End
  332.     :LABEL017
  333.     AnsiPos INTEGER003, INTEGER004
  334.     ClrEol
  335.     PrintLn "@X0AGIF collage #", INTEGER010, " (", STRING003, ") is ready and being moved to a download area."
  336.     INTEGER003 = GetX()
  337.     INTEGER004 = GetY()
  338.     TSTRING006(INTEGER015) = STRING003
  339.     INTEGER015 = INTEGER015 + 1
  340.     STRING004 = STRING016 + "\" + STRING003
  341.     STRING003 = "GIFDSK00.GIF"
  342.     Copy STRING003, STRING004
  343.     Delete "GIFDSK00.GIF"
  344.     SaveScrn
  345.     Shell 1, INTEGER002, "ATTRIB -r " + STRING008 + "*.GIF", ""
  346.     Shell 1, INTEGER002, "DEL " + STRING008 + "*.GIF", ""
  347.     RestScrn
  348.     AnsiPos INTEGER003, INTEGER004
  349.     If (INTEGER001 > 0) Then
  350.         Goto LABEL015
  351.     Endif
  352.     FClose 1
  353.     Delete "GIFCOLL." + STRING011
  354.     PrintLn " "
  355.     PrintLn "@X0AYour collage file(s) are ready to download.  @X0CIf you do not want to download"
  356.     PrintLn "the GIF files that have been placed in the collage file(s), answer @X0FN@X0C to the"
  357.     PrintLn "@X0EDownload Flagged Files@X0C question.  @X0AIf you do want to download them along with"
  358.     PrintLn "the collage file(s), then answer @X0FY@X0A to the question."
  359.     STRING007 = TSTRING006(1)
  360.     INTEGER015 = 2
  361.     While (TSTRING006(INTEGER015) <> "*") Do
  362.         STRING007 = STRING007 + ";" + TSTRING006(INTEGER015)
  363.         INTEGER015 = INTEGER015 + 1
  364.         If (INTEGER015 > 11) Then
  365.             Break
  366.         Endif
  367.     EndWhile
  368.     Download STRING007
  369.     INTEGER015 = 1
  370.     While (TSTRING006(INTEGER015) <> "*") Do
  371.         Delete STRING016 + "\" + TSTRING006(INTEGER015)
  372.         INTEGER015 = INTEGER015 + 1
  373.         If (INTEGER015 > 11) Then
  374.             Break
  375.         Endif
  376.     EndWhile
  377.     If (INTEGER016 <> 0) Then
  378.         Cls
  379.         PrintLn " "
  380.         PrintLn " "
  381.         PrintLn " "
  382.         PrintLn " "
  383.         PrintLn " "
  384.         PrintLn "@X38┌────────────────────────────────────────────────────────────────────────────@X3B┐@X0B"
  385.         PrintLn "@X38│                          @X39GIF Collage Builder v2.7                          @X3B│@X0B"
  386.         PrintLn "@X38│@X3E                                                                            @X3B│@X0B"
  387.         PrintLn "@X38│@X3E Thank you for using the GIF Collage processor command.  If you find this   @X3B│@X0B"
  388.         PrintLn "@X38│@X3E PCBoard add on command usefull, please ask your SysOp to register it today!@X3B│@X0B"
  389.         PrintLn "@X38│@X3E You could even offer to share the small cost to get rid of that annoying   @X3B│@X0B"
  390.         PrintLn "@X38│@X3E delay when it starts along with this irritating screen.                    @X3B│@X0B"
  391.         PrintLn "@X38│@X3E                                                                            @X3B│@X0B"
  392.         PrintLn "@X38│@X39                     Remember, Shareware is NOT Freeware!                   @X3B│@X0B"
  393.         PrintLn "@X38│@X3E                                                                            @X3B│@X0B"
  394.         PrintLn "@X38└@X3B────────────────────────────────────────────────────────────────────────────┘@X0F"
  395.         PrintLn " "
  396.         PrintLn " "
  397.         PrintLn " "
  398.         PrintLn " "
  399.         PrintLn " "
  400.         PrintLn "@PAUSE@"
  401.     Endif
  402.     End
  403.  
  404. ;------------------------------------------------------------------------------
  405. ;
  406. ; Usage report (before postprocessing)
  407. ;
  408. ; ■ Statements used :
  409. ;
  410. ;    7       End
  411. ;    4       Cls
  412. ;    4       ClrEol
  413. ;    1       More
  414. ;    78      Goto 
  415. ;    69      Let 
  416. ;    9       Print 
  417. ;    59      PrintLn 
  418. ;    53      If 
  419. ;    1       DispFile 
  420. ;    5       FOpen 
  421. ;    5       FClose 
  422. ;    5       FGet 
  423. ;    9       Delete 
  424. ;    7       Log 
  425. ;    2       InputStr 
  426. ;    4       Delay 
  427. ;    1       Newline
  428. ;    3       Tokenize 
  429. ;    7       Shell 
  430. ;    4       AnsiPos 
  431. ;    5       Backup 
  432. ;    4       SaveScrn
  433. ;    4       RestScrn
  434. ;    1       FRead 
  435. ;    1       FWrite 
  436. ;    3       Copy 
  437. ;    1       Download 
  438. ;
  439. ;
  440. ; ■ Functions used :
  441. ;
  442. ;    2       *
  443. ;    3       /
  444. ;    69      +
  445. ;    1       -
  446. ;    17      ==
  447. ;    3       <>
  448. ;    14      <
  449. ;    3       <=
  450. ;    7       >
  451. ;    6       >=
  452. ;    47      !
  453. ;    6       &&
  454. ;    3       ||
  455. ;    2       Upper()
  456. ;    2       Ferr()
  457. ;    1       Random()
  458. ;    1       YesChar()
  459. ;    2       PCBDat()
  460. ;    6       PPEPath()
  461. ;    2       ReadLine()
  462. ;    10      GetToken()
  463. ;    1       MinLeft()
  464. ;    1       GetEnv()
  465. ;    10      Exist()
  466. ;    3       GetX()
  467. ;    3       GetY()
  468. ;    1       HelpPath()
  469. ;    4       TokCount()
  470. ;
  471. ;------------------------------------------------------------------------------
  472. ;
  473. ; Analysis flags : Sd
  474. ;
  475. ; S - Shell to DOS ■ 5
  476. ;     This may be normal if the PPE need to execute an external command,
  477. ;     but may be actually anything... nasty (formating HD, rebooting,...)
  478. ;     or usefull (sorting, maintenance,...). Check!
  479. ;     ■ Search for : SHELL
  480. ;
  481. ; d - Access PCBOARD.DAT ■ 2
  482. ;     Program gets the full pathname to PCBOARD.DAT, this may be usefull
  483. ;     for many PPE so they can find various informations on the system
  484. ;     (system paths, max number of lines in messages, ...) but it may also
  485. ;     be a way to gather vital informations.
  486. ;     ■ Search for : PCBDAT()
  487. ;
  488. ;------------------------------------------------------------------------------
  489. ;
  490. ; Postprocessing report
  491. ;
  492. ;    3       For/Next
  493. ;    3       While/EndWhile
  494. ;    30      If/Then or If/Then/Else
  495. ;    2       Select Case
  496. ;
  497. ;------------------------------------------------------------------------------
  498. ;                 AEGiS Corp - Break the routines, code against the machines!
  499. ;------------------------------------------------------------------------------
  500.